package com.military.pojo;

import java.util.Arrays;

public enum SymbolFileType {
    _2D(".svg"),
    _3D(".glb");

    private final String ext;

    SymbolFileType(String ext) {
        this.ext = ext;
    }

    public static SymbolFileType fromExtension(String ext) {
        return Arrays.stream(values())
                     .filter(t -> t.ext.equalsIgnoreCase(ext))
                     .findFirst()
                     .orElseThrow(() -> new IllegalArgumentException("Unsupported file type: " + ext));
    }

    public String getExt() {
        return ext;
    }
}
